<?php
/**
 * Created by PhpStorm.
 * User: Rag_Panda
 * Date: 2015/12/9
 * Time: 13:52
 */


//Route::group(['middleware' => ['LoginUserCheck']],function() {

    Route::post("/api_aUser", "Api\BaseController@aUser");//添加用户 （注册用）
    Route::post("/api_uUser", "Api\BaseController@uUser");//修改用户数据
    Route::post("/api_sUser", "Api\BaseController@sUser");//查询用户数据

    //文章的增删改查
    Route::post("/api_sArticle", "Api\ArticleController@sArticle");//返回符合接口描述文章所有信息的json
    Route::post("/api_sIndexArticle", "Api\ArticleController@sIndexArticle");//前台文章显示的接口 我们已经废弃了带有权限的查询，建议使用它
    Route::get("/api_sIndexArticle", "Api\ArticleController@sIndexArticleByGet");//提供给APP使用的
    Route::post("/api_dArticle", "Api\ArticleController@dArticle");//删除文章接口
    //Route::post("/api_moreArticle","Api\ArticleController@moreArticle");//查看文章详情


    Route::post("/api_sArticleClass","Api\ArticleController@sArticleClass");//查询所有文章分类
    Route::post("/api_uArticleClass","Api\ArticleController@uArticleClass");//更改文章分类
    //Route::post("/api_dArticleClass","Api\ArticleController@dArticleClass");//删除文章分类
    //Route::post("/api_aReply","Api\ArticleController@aReply");//添加评论接口
    Route::post("/api_dReply","Api\ArticleController@dReply");//删除评论接口

    //对专题的操作
    Route::post("/api_sSubject", "Api\SubjectController@sSubject");//查看专题
    Route::post("/api_sArticleToSubject", "Api\SubjectController@sArticleToSubject");//根据当前专题查找此专题下的所有文章
    Route::post("/api_getSubjectByUser", "Api\SubjectController@getSubjectByUser");//查找当前用户的所有专题
    Route::post("/api_aSubject", "Api\SubjectController@aSubject");//添加一个用户专题
    Route::post("/api_uSubject", "Api\SubjectController@uSubject");//更新一个用户专题
    Route::post("/api_dSubject", "Api\SubjectController@dSubject");//删除一个用户专题
    Route::post("/api_aSubjectArticle", "Api\SubjectController@aSubjectArticle");//添加一篇文章到专题
    Route::post("/api_dSubjectArticle", "Api\SubjectController@dSubjectArticle");//删除一篇文章从专题

    //对标签的操作
    Route::post("/api_sLabel", "Api\LabelController@sLabel");//查看标签
    Route::post("/api_aLabel", "Api\LabelController@aLabel");//添加标签
    Route::post("/api_uLabel", "Api\LabelController@uLabel");//更新标签
    Route::post("/api_dLabel", "Api\LabelController@dSLabel");//删除标签
    Route::post("/api_addArticleLabel", "Api\LabelController@addArticleLabel");//给文章添加标签
    Route::post("/api_removeArticleLabel", "Api\LabelController@removeArticleLabel");//给文章移除标签

    //测试接口，回显
    Route::post("/api_testRevice",function(){
        $query_limit = \Illuminate\Http\Request::input(query_limit);
        foreach (getallheaders() as $name => $value) {
            echo "$name: $value\n";
        }
        var_dump($query_limit);
        echo file_get_contents('php://input');
    });
//});